package com.test.study.ToolsUtils.strom.workdsum;

import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.tuple.Fields;

public class MainTopoly {
	public static void main(String[] args) {
		TopologyBuilder builder=new TopologyBuilder();
		builder.setSpout("file", new GoloabSpout());
		builder.setBolt("line", new GoloaBolt(),2).shuffleGrouping("file");
		builder.setBolt("word", new GetWordCount(),2).fieldsGrouping("line", new Fields("word"));
		builder.setBolt("count", new AllBolt()).shuffleGrouping("word");
		LocalCluster cluster=new LocalCluster();
		Config config = new Config();
		cluster.submitTopology("CountWord", config, builder.createTopology());
		
	}
	

}
